package com.onlinemusic.service;

import com.onlinemusic.common.R;
import com.onlinemusic.pojo.request.ConsumerPhoneCodeRequest;

/**
 * 短信验证码相关业务接口
 */
public interface LoginService {

    /**
     * 手机短信发送验证码
     *
     * @param phone
     * @return
     */
    R sendRCode(String phone);

    /**
     * 手机短信验证码验证及登录
     *
     * @param phoneCode
     * @return
     */
    R checkRCode(ConsumerPhoneCodeRequest phoneCode);

    /**
     * 发送邮箱
     * @param recipientEmail
     * @param activationCode
     * @param message
     * @return
     */
    R sendMailCode(String recipientEmail , String activationCode,String message);

    /**
     * 验证邮箱code
     * @param recipientEmail
     * @param code
     * @return
     */
    boolean checkMailCode(String recipientEmail, String code);
}
